import React, { FC } from "react";
import { Outlet } from "react-router-dom";
import useLoadingUseInfo from "../hooks/useLoadingUserInfo";
import { Spin } from "antd";
import useNavPage from "../hooks/useNviPage";

const QuestionLayout: FC = () => {
  const { waitingLoadUser } = useLoadingUseInfo();  
  useNavPage(waitingLoadUser)
  return (
    <div>
      <div> {waitingLoadUser ? <div style={{textAlign:'center',marginTop:'40vh'}}><Spin /></div> : <Outlet />}</div>
    </div>
  );
};
export default QuestionLayout;
